﻿@model BbsEditModel
@{
    ResLink.AddJs("~/res/se2/js/HuskyEZCreator.js");
    ResLink.AddJs("~/res/js/mySE2.js");
}

<form id="편집폼">
    <div>
        제목: 
        @Html.TextBoxFor(m => m.게시글.제목, new { style = "width:700px; border-style:groove; margin:2px; ime-mode:active;", lsj_data_validate = "required" })
    </div>
    <div>
        분류:
        @Html.DropDownListFor(m => m.게시글.게시글분류ID, new SelectList(Model.게시글분류목록, "ID", "제목", Model.게시글.게시글분류ID))
    </div>
    @Html.TextAreaFor(m => m.게시글.내용, new { id="글_내용", @class = "smarteditor2", rows = "30", cols = "100", style = "width: 766px; height: 600px; display: none;" })
    @Html.HiddenFor(m => m.게시글.ID)
    @Html.HiddenFor(m => m.게시글.게시판ID)

    <a onclick="게시글저장()" class="btn btn-primary"><i class="icon-hdd icon-white"></i> 저장</a>
    @if (Model.게시글.ID == 0) {
        <a href="@Url.BbsList(Model.게시글.게시판ID)" class="btn">취소</a>
    } else {
        <a href="@Url.BbsArticle(Model.게시글.ID)" class="btn">취소</a>
    }
</form>

<script type="text/javascript">
    function 게시글저장() {
        smartEditor_syncData();
        AjaxPostForm($("#편집폼"), '@Url.MyAction("Save", "Bbs")');
    }
</script>